-
-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new feature SASL SCRAM #1706
base: develop
Are you sure you want to change the base?
Conversation
ca18a44
to
0886fc2
Compare
State machine for sasl scram Add Tcl_TraceVar() for sasl-mechanism Modularized sasl stuff into sasl.c / Refactor Updated doc Set sasl-username to username, if not set Enhance logging Leave got900() in servmsg.c instead of sasl.c Constant time memory comparison Update valid cap sasl mechanism list on server 908 Handle SASL AUTHENTICATE server error pre sasl mechanism ECDH-X25519-CHALLENGE
0886fc2
to
4c0d051
Compare
EXTERNAL not possible via non-ssl connection, so do not try but log Enhance error logging
Ready for review :) |
/* RFC 5802 - printable ASCII characters excluding ',' | ||
* printable = %x21-2B / %x2D-7E | ||
*/ | ||
#define CHARSET_SCRAM "\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2d\x2e\x2f\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x7b\x7c\x7d\x7e" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move this into server.h?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could, but i think sasl.c is a better place for this, for its only related to sasl. similar to the defines and enums that follow. But we could move it into function sasl_scram_step_0().
Why my previous comment has been removed? Dear @eggheads team, @michaelortmann, I have discovered this PR by chance, nice to see this SCRAM improvement! Linked to: |
Found by:
Patch by: michaelortmann
Fixes:
One-line summary:
Additional description (if needed):
This PR implements SASL_MECHANISM_SCRAM_SHA_256 and SASL_MECHANISM_SCRAM_SHA_512
State machine for sasl scram
Add Tcl_TraceVar() for sasl-mechanism
Cache client and server key for sasl scram
Modularized sasl stuff into sasl.c / Refactor
Updated doc
Set sasl-username to username, if not set
Enhance logging
Leave got900() in servmsg.c instead of sasl.c
Constant time memory comparison
Update valid cap sasl mechanism list on server 908
Handle SASL AUTHENTICATE server error
pre sasl mechanism ECDH-X25519-CHALLENGE
Checks 3 boxes in #832:
#688 (comment) - grawity proposed replacing sasl state processing with real state keeping.
Implement scram authentication
Handle 908 messages
Test cases demonstrating functionality (if applicable):